/*-------------------------------------------------------------------------
 - Copyright (c) 2024-2025 [XD-AMCC TEAM]
 - [XD-AMCC] is licensed under Mulan PSL v2.
 - You can use this software according to the terms and conditions of the Mulan PSL v2.
 - You may obtain a copy of Mulan PSL v2 at:
 -          http://license.coscl.org.cn/MulanPSL2
 - THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES
 - OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
 - TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 - See the Mulan PSL v2 for more details.
 ------------------------------------------------------------------------*/

/**
 * @brief  Declaration of comments for IR-codes.
 *
 * These comments should be attached to  each IR-code.
 *
 * @author  WXQ#XDU
 * @date    2025.01
 */

#pragma once


#ifndef AMCC_IRCODE_COMMENT_H
#define AMCC_IRCODE_COMMENT_H

#define CODEDESC_BUG        "AMCC BUG"
#define CODEDESC_GLOBSCOPE  "global-scope"

#define CODEDESC_INITVAR    "initialize variable by initializer"
#define CODEDESC_SETVAR0    "initialize variable to 0, simulating RunTime-Env"

#define CODEDESC_OPASSIGN       "x op= y"
#define CODEDESC_OPASSIGN_ARR   "arr[i1,...,in] op= E"
#define CODEDESC_ARR_WRITE      "V.place [ V.offset ] = E.place"
#define CODEDESC_ARR_READE      "t1 = V.place[V.offset]"
#define CODEDESC_ARR_VK1        "v[k] = v[k-1] * d[k]"
#define CODEDESC_ARR_VK2        "v[k] = v[k] + E.place"
#define CODEDESC_ARR_VKn        "V.offset = v[n] * w"
#define CODEDESC_ARR_ADDR       "V.place = arr - C"

#define CODEDESC_CALL           "invoke function with arguments counter"
#define CODEDESC_PARAM          "actual parameter"
#define CODEDESC_PASSARG        "simulate argument-passing in RunTime-Env"
#define CODEDESC_ADDRET         "enforced return"
#define CODEDESC_NORET_VAL      "missed return value"

#define CODEDESC_BOOL2VAL       "value of bool-expr"
#define CODEDESC_VAL2BOOL       "convert to bool-expr"

#define CODEDESC_BACKPATCHED    "back-patched"

#define CODEDESC_ELSE           "ELSE"
#define CODEDESC_BREAK          "BREAK"
#define CODEDESC_CONTINUE       "CONTINUE"
#define CODEDESC_LOOPBODY_END   "end of loop body"



#endif //AMCC_IRCODE_COMMENT_H
